﻿using MediatR;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebMediaTRApi.Notifications
{
    public class Ping: INotification 
    {

    }


    public class Pong1 : INotificationHandler<Ping>
    {
        private readonly ILogger<Pong1> _logger;

        public Pong1(ILogger<Pong1> logger)
        {
            _logger = logger;
        }
        public Task Handle(Ping notification, CancellationToken cancellationToken)
        {
            _logger.LogInformation("Pong 1");
            return Task.CompletedTask;
        }
    }


    public class Pong2 : INotificationHandler<Ping>
    {
        private readonly ILogger<Pong1> _logger;

        public Pong2(ILogger<Pong1> logger)
        {
            _logger = logger;
        }
        public Task Handle(Ping notification, CancellationToken cancellationToken)
        {
            _logger.LogInformation("Pong 2"); 
            return Task.CompletedTask;
        }
    }
}
